package net.jeeshop.services.front.bbs.impl;

import net.jeeshop.core.ServersManager;
import net.jeeshop.services.front.bbs.BbsCommentService;
import net.jeeshop.services.front.bbs.bean.BbsComment;
import net.jeeshop.services.front.bbs.dao.BbsCommentDao;
import net.jeeshop.services.front.bbs.dto.BbsCommentDTO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by zuohao on 16/7/7.
 */
@Service("bbsCommentServiceFront")
public class BbsCommentServiceImpl extends ServersManager<BbsComment, BbsCommentDao> implements BbsCommentService {

    @Resource(name = "bbsCommentDaoFront")
    @Override
    public void setDao(BbsCommentDao bbsCommentDao) {
        this.dao=bbsCommentDao;
    }

    @Override
    public List<BbsComment> selectBbsCommentByBbsDetailId(Map map) {
        return dao.selectBbsCommentByBbsDetailId(map);
    }

    @Override
    public int selectBbsCommentCountByBbsDetailId(Map map) {
        return dao.selectBbsCommentCountByBbsDetailId(map);
    }

    @Override
    public void insertBbsComment(BbsComment bbsComment){
        dao.insertBbsComment(bbsComment);
    }

    @Override
    public List<BbsComment> selectBbsCommentByType(Map<String, Object> map) {
        return dao.selectBbsCommentByType(map);
    }

    @Override
    public int deleteBbsCommentById(Map map) {
        return dao.deleteBbsCommentById(map);
    }

    @Override
    public int deleteBbsCommentByDetailId(String detailId) {
        return dao.deleteBbsCommentByDetailId(detailId);
    }

    @Override
    public List<BbsCommentDTO> selectBbsCommentDTOByBbsDetailId(Map<String, Object> param) {
        return dao.selectBbsCommentDTOByBbsDetailId(param);
    }

}
